<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style type="text/css">
			.reset { 
			  padding-left: 20px; 
			  counter-reset: wangxiaoer;
			}
			.counter:before { 
			  content: counters(wangxiaoer, '-') '. '; 
			  counter-increment: wangxiaoer;
			}
		</style>
	</head>
	<body>
		<div class="reset">
			<div class="counter">我是王小二
				<div class="reset">
					<div class="counter">我是王小二的大儿子</div>
					<div class="counter">我是王小二的二儿子
						<div class="reset">
							<div class="counter">我是王小二的二儿子的大孙子</div>
							<div class="counter">我是王小二的二儿子的二孙子</div>
							<div class="counter">我是王小二的二儿子的小孙子</div>
						</div>
					</div>
					<div class="counter">我是王小二的三儿子</div>
				</div>
			</div>
			<div class="counter">我是王小三</div>
			<div class="counter">我是王小四
				<div class="reset">
					<div class="counter">我是王小四的大儿子</div>
				</div>
			</div>
		</div>
	</body>
</html>
